package main

import (
	"time"

	"code.oldboyedu.com/studygo/day06/mylogger"
)

var log mylogger.Logger

func main() {

	/* 	log = mylogger.NewConsoleLogger("Info")
	   	log = mylogger.NewFileLogger("Info", "./", "zl.log", 10*1024) */
	//log := mylogger.NewConsoleLogger("Info")
	log := mylogger.NewFileLogger("ErrOr", "./", "zl.log", 10*1024)
	//mylogger.Dz(log, 1, 10010, "xx")
	for {
		id := 10010
		name := "LX"
		log.Debug("这是一条Debug日志,id:%d,name:%s !", id, name)
		log.Info("这是一条Info日志,id:%d,name:%s !", id, name)
		log.Warning("这是一条Waring日志,id:%d,name:%s !", id, name)
		log.Error("这是一条Error日志,id:%d,name:%s !", id, name)
		log.Fatal("这是一条fatal日志,id:%d,name:%s !", id, name)
		time.Sleep(time.Second * 2)
	}

}
